<?php echo View::factory('admin/sys/sys_left')->render(); ?>
<script>        
    $(document).ready(function() {
        $( ".format2" ).buttonset();
        $('.delete').click(function() {
            var del = this;
            deletenotice = "您确定要删除<font color='#FF0084'>" +$('#advid-'+$(del).text()).text() +"</font>吗？";
            $('#delete-notice').html(deletenotice);
            $( "#dialog:ui-dialog" ).dialog( "destroy" );
            $( "#dialog-confirm" ).dialog({
                resizable: false,
                height:140,
                modal: true,
                buttons: {
                    "确定": function() {
                        $( this ).dialog( "close" );
                        var deleteurl = "/admin/flink/delete/"+$(del).text();
                        window.location.href=deleteurl;
                    },
                    "取消": function() {
                        $( this ).dialog( "close" );
                    }
                }
            });
            return false;
        });
        
        $('#delete-all-submit').button();
        $( ".delete" ).button({
            icons: {
                primary: "ui-icon ui-icon-trash"
            },
            text: false
        });
        $( ".edit" ).button({
            icons: {
                primary: "ui-icon ui-icon-pencil"
            },
            text: false
        });
        $('#add').button({
            icons:{
                primary:"ui-icon ui-icon-plusthick"
            },
            text:true
        });
        $('.archives_cat li').mousemove(function() {
            $('.onhover').removeClass('onhover');
            $(this).addClass('onhover');
        });
        $('.archives_cat li').mouseout(function() {
            $('.onhover').removeClass('onhover');
            
        });
    });
</script>
<div id="dialog-confirm" title="友情提醒" style="display: none">
    <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><span id="delete-notice">您确定要删除该用户吗？</span></p>
</div>
<style>
    .archives_cat span {float: right;white-space: normal;margin: 2px; }
    .archives_cat .advnamecolor{color:#666666;padding-left: 20px;padding-top: 3px;}
    .archives_cat ul li span a{padding:0px;}
    #add_advs {float: right;padding-right: 9px;}
    .archives_cat ul li .advsname { float: left; }
</style>
<div id="do_right" class="catalog_right">
    <div class="box" style="overflow:hidden;">
        <h3 id="h3_left">参数列表</h3>
        <div id="add_advs"><a href="/admin/flink/add"><button id="add">添加参数</button></a></div>
        <div class="clear"></div>
        <form action="/admin/flink/delete_all/" name="newslistform" method="post" >
            <table>
                <thead>
                    <tr>
                        <th scope="col">选择</th>
                        <th scope="col">网站名称</th>
                        <th scope="col">网站地址</th>
                        <th scope="col">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <?php if (is_array($data)): $i = 0; ?>
                        <?php foreach ($data as $key => $result): ?>
                            <tr <?php if (++$i % 2 == 0): ?>class="odd"<?php endif ?>>
                                <td><span class="format2"  ><input type="checkbox" id="check<?php echo $result->chr_id; ?>" /><label for="check<?php echo $result->chr_id; ?>"><?php echo $result->chr_id; ?></label></span></td>
                                <td><?php echo $result->chr_flinkname ?></td>
                                <td width="40%"><?php echo $result->chr_url; ?></td>
                                <td><a href="/admin/flink/edit/<?php echo $result->chr_id ?>"><button class="edit" type="button">编辑</button></a><a href="#" ><button class="delete"><?php echo $result->chr_id ?></button></a></td>
                            </tr>
                        <?php endforeach ?>               
                    <?php endif ?>

                </tbody>
                <tfoot>
                    <tr>
                        <td colspan="5"><input type="submit" name="deletealls" value="删除" id="delete-all-submit" style=" float: left;"/>
                         </td>
                    </tr>
                </tfoot>
            </table>
            
        </form>
        <div class="archives_cat">




            
        </div>
    </div>
</div>
